/*
 * Copyright 2017 hv0912
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.vimhe.ezimp2.handler;

import com.vimhe.ezimp2.config.bean.ColumnConfig;
import com.vimhe.ezimp2.config.bean.FileConfig;
import com.vimhe.ezimp2.config.bean.RowConfig;
import com.vimhe.ezimp2.config.bean.SheetConfig;
import com.vimhe.ezimp2.handler.bean.CellData;
import com.vimhe.ezimp2.handler.bean.FileData;
import com.vimhe.ezimp2.handler.bean.RowData;
import com.vimhe.ezimp2.handler.bean.SheetData;

/**
 * 数据写入器接口
 * <br/>这里取到的数据一定是配置文件中指定要读取的数据
 * <br/>出现在这里的数据是经过框架处理之后的，有可能已经不再是表格里的原始数据了
 *
 * @author Vimhe
 */
public interface Writer {

    /**
     * 写出一个单元格的数据
     *
     * @param cellData     单元格数据对象
     * @param columnConfig 单元格配置对象
     */
    void write(CellData cellData, ColumnConfig columnConfig);

    /**
     * 写出一行的数据
     *
     * @param rowData   行数据对象
     * @param rowConfig 行配置对象
     */
    void write(RowData rowData, RowConfig rowConfig);

    /**
     * 写出一个工作表的数据
     *
     * @param sheetData   工作表数据对象
     * @param sheetConfig 工作表配置对象
     */
    void write(SheetData sheetData, SheetConfig sheetConfig);

    /**
     * 写出一个文件的数据
     *
     * @param fileData   文件数据对象
     * @param fileConfig 文件配置对象
     */
    void write(FileData fileData, FileConfig fileConfig);

}
